#ifndef GAME_MAP_H
#define GAME_MAP_H

#include <Gosu/Gosu.hpp>
#include <Gosu/Utility.hpp>
#include <Gosu/AutoLink.hpp> // Makes life easier for Windows users compiling this.

#include "boost/multi_array.hpp"

#include <cstdlib>
#include <vector>
#include <fstream>
#include "objects.h"


class GameMap
{


public:

	GameMap(Gosu::Graphics& gfx, std::vector<bigTile> *bigTiles, std::vector<smallTile> *smallTiles, const int width,const int height);
	void set(double x, double y);
	bool onMap(double x, double y);
	void defineBig(bigTile a);
	void defineSmall(smallTile a);

	void draw();

	void loadMap(const char * mapName);
	void saveMap(const char * mapName);



private:



	boost::multi_array<int, 2> bigGrid;
	boost::multi_array<int, 2> smallGrid;


	int width,height, displacementX, displacementY, windowHeight, windowWidth;


	Gosu::Graphics * graphics;
	bigTile	currentBig;
	smallTile	currentSmall;

	std::vector<bigTile> bigTiles;
	std::vector<smallTile> smallTiles;
	std::vector<Gosu::Image *> bigImages;
	std::vector<Gosu::Image *> smallImages;
	bool isBig;


	boost::scoped_ptr<Gosu::Image> arrowUpDown;
	boost::scoped_ptr<Gosu::Image> arrowLeftRight;






};

#endif